home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / COMPILER / SATHER / !Sather / Library / Containrs / sa / pq < prev    next >
Text File  |  1996-04-09  |  1KB  |  33 lines

  1. ---------------------------> Sather 1.1 source file <--------------------------
  2. -- Copyright (C) 1995, International Computer Science Institute
  3. -- $Id: pq.sa,v 1.3 1996/04/09 10:05:20 borisv Exp $
  4. --
  5. -- COPYRIGHT NOTICE: This code is provided WITHOUT ANY WARRANTY
  6. -- and is subject to the terms of the SATHER LIBRARY GENERAL PUBLIC
  7. -- LICENSE contained in the file: Sather/Doc/License of the
  8. -- Sather distribution. The license is also available from ICSI,
  9. -- 1947 Center St., Suite 600, Berkeley CA 94704, USA.
  10. -------------------------------------------------------------------
  11. abstract class $PQ{T < $IS_LT{T}} < $DISPENSER{T} is
  12.    -- Standard priority queue abstraction. Returns the element with
  13.    -- the highest priority
  14.  
  15.    top: T; 
  16.    -- Return the top element of the queue. 
  17.    
  18.    pop: T;
  19.    -- Remove and return the top most element (alias for "remove")
  20.    
  21.    insert(e: T);
  22.    -- Insert the element "e" into the priority queue
  23.    
  24.    clear;
  25.    -- Remove all elements from the queue
  26.  
  27.    is_empty: BOOL;
  28.    -- Return true if the queue is empty
  29.    
  30.    
  31. end;
  32. -------------------------------------------------------------------
  33.